<template>
    <div class="setting">
        <mt-header title="设置">
            <router-link to="" slot="left">
                <mt-button @click="goBackFun()"></mt-button>
            </router-link>
        </mt-header>
        <div class="setting_wrap">
            <p>
                <span>消息通知</span>
                <span>
                    <img src="../../assets/images/setting_radio_open_icon@2x.png" alt="">
                </span>
            </p>
            <p>
                <span>消息通知</span>
                <span>
                    <img src="../../assets/images/setting_radio_close_icon@2x.png" alt="">
                </span>
            </p>
        </div>
        <div class="setting_wrap">
            <p>
                <span>意见反馈</span>
                <span></span>
            </p>
            <p>
                <span>检查更新</span>
                <span>1.0版本</span>
            </p>
        </div>
        
        
        <div class="setting_wrap">
            <p>
                <span>关注微信公众号</span>
            </p>
            <p>
                <span>分享给小伙伴</span>
            </p>
            <p>
                <span>关于我们</span>
            </p>
        </div>
        <div class="btn_wrap">
            <button @click="toLogin()">退出</button>
        </div>
    </div>
</template>
<script>
export default {
    name:'setting',
    data() {
        return {
            pageId:'',
        }
    },
    created() {
        this.pageId = this.$route.params.id;
    },
    methods: {
        goBackFun(){
            window.webkit.messageHandlers.setting.postMessage({
                pageName:this.pageId,
            });
        },
        toLogin(){
            window.webkit.messageHandlers.setting.postMessage({
                pageName:"3",
            });
        }
        
    },
}
</script>
<style lang="scss" scoped>
.setting{
    background: #f5f5f5;
}
.setting_wrap{
    padding:0 30px;
    margin-bottom: 30px;
    background: #fff;
    font-size: 28px;
    p{
        display: flex;
        height: 98px;
        align-items: center;
        border-bottom: 1px solid #efefef;
        span{
            flex: 1;
            img{
                margin-top: 12.5px;
                width: 96px;
                height: 63px;
            }
            &:nth-child(2){
                text-align: right;
            }
        }
        &:last-child{
            border-bottom: none;
        }
    }
}
.btn_wrap{
    width: 100%;
    margin-top:0px;
    button{
        display: block;
        width: 80%;
        height: 80px;
        margin: 0 auto;
        border-radius: 10px;
        font-size: 34px;
        color: #fff;
        background: #ff6f34;
        
    }
}
</style>